package recursion

import problem.Problem

class Q104MaximumDepthOfBinaryTree extends Problem {

  def maxDepth(root: TreeNode): Int = {
    if (root == null) 0
    else {
      math.max(maxDepth(root.left), maxDepth(root.right)) + 1
    }
  }

  override def test(): Unit = {

  }
}
